namespace BaseballGame.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class leagueandteam : DbMigration
    {
        public override void Up()
        {
            AddColumn("dbo.leagues", "team1ID", c => c.Int(nullable: false));
            AddColumn("dbo.leagues", "team2ID", c => c.Int(nullable: false));
            AddColumn("dbo.leagues", "team3ID", c => c.Int(nullable: false));
            AddColumn("dbo.leagues", "team4ID", c => c.Int(nullable: false));
            AddForeignKey("dbo.leagues", "team1ID", "dbo.Teams", "Id");
            AddForeignKey("dbo.leagues", "team2ID", "dbo.Teams", "Id");
            AddForeignKey("dbo.leagues", "team3ID", "dbo.Teams", "Id");
            AddForeignKey("dbo.leagues", "team4ID", "dbo.Teams", "Id");
            CreateIndex("dbo.leagues", "team1ID");
            CreateIndex("dbo.leagues", "team2ID");
            CreateIndex("dbo.leagues", "team3ID");
            CreateIndex("dbo.leagues", "team4ID");
        }
        
        public override void Down()
        {
            DropIndex("dbo.leagues", new[] { "team4ID" });
            DropIndex("dbo.leagues", new[] { "team3ID" });
            DropIndex("dbo.leagues", new[] { "team2ID" });
            DropIndex("dbo.leagues", new[] { "team1ID" });
            DropForeignKey("dbo.leagues", "team4ID", "dbo.Teams");
            DropForeignKey("dbo.leagues", "team3ID", "dbo.Teams");
            DropForeignKey("dbo.leagues", "team2ID", "dbo.Teams");
            DropForeignKey("dbo.leagues", "team1ID", "dbo.Teams");
            DropColumn("dbo.leagues", "team4ID");
            DropColumn("dbo.leagues", "team3ID");
            DropColumn("dbo.leagues", "team2ID");
            DropColumn("dbo.leagues", "team1ID");
        }
    }
}
